package com.xuxk.project.util;


import java.io.Serializable;
import java.util.Date;


/**
 *  规范日志格式，以便方便引入elk对日志分析，做识别
 *
 *
 * @author xuxk
 */
public class ElkLog implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 服务名称
	 */
	private String serverName ;
	/**
	 * 请求ip
	 */
	private String ip ;
	/**
	 * 请求方法
	 */
	private String requestMethod ;

	/**
	 * 请求参数
	 */
	private String reqParam ;
	/**
	 * 请求函数
	 */
	private String classForName ;
	/**
	 * 时间名称
	 */
	private String eventName ;
	/**
	 * 记录时间
	 */
	private Date recordDate;
	/**
	 * 耗时时长
	 */
	private long costTime;
	/**
	 *拓展属性
	 */
	private String extendField ;


	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getRequestMethod() {
		return requestMethod;
	}

	public void setRequestMethod(String requestMethod) {
		this.requestMethod = requestMethod;
	}

	public String getClassForName() {
		return classForName;
	}

	public void setClassForName(String classForName) {
		this.classForName = classForName;
	}

	public String getEventName() {
		return eventName;
	}

	public void setEventName(String eventName) {
		this.eventName = eventName;
	}

	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}

	public long getCostTime() {
		return costTime;
	}

	public void setCostTime(long costTime) {
		this.costTime = costTime;
	}

	public String getExtendField() {
		return extendField;
	}

	public void setExtendField(String extendField) {
		this.extendField = extendField;
	}

	public String getReqParam() {
		return reqParam;
	}

	public void setReqParam(String reqParam) {
		this.reqParam = reqParam;
	}

	@Override
	public String toString() {
		return "ElkLog{" +
				"serverName:'" + serverName + '\'' +
				", ip:'" + ip + '\'' +
				", requestMethod:'" + requestMethod + '\'' +
				", reqParam:'" + reqParam + '\'' +
				", classForName:'" + classForName + '\'' +
				", eventName:'" + eventName + '\'' +
				", recordDate:" + recordDate +
				", costTime:" + costTime +
				", extendField:'" + extendField + '\'' +
				'}';
	}
}
